<template>
  <div class="app-container">
    <el-table
      :data="resources"
      size="mini"
      border
      stripe
      row-key="id"
      highlight-current-row
    >
      <el-table-column type="index" width="55" />
      <el-table-column
        type="selection"
        width="55"
      />
      <el-table-column
        prop="origin.toolResource.resourceName"
        label="资源名称"
        sortable
        width="320"
      />
      <el-table-column
        prop="origin.toolResource.url"
        label="资源路径"
      />
      <el-table-column
        prop="origin.toolResource.type"
        label="资源类型"
        width="180"
      />
      <el-table-column
        prop="origin.toolResource.routeName"
        label="路由名称"
        width="180"
      />
      <el-table-column
        prop="origin.toolResource.pluginName"
        label="插件名称"
        sortable
        width="180"
      />
    </el-table>
  </div>
</template>

<script>
import security from '@/api/security'

export default {
  name: 'resource',
  data() {
    return {
      resources: []
    }
  },
  mounted() {
    this.loadResources()
  },
  methods: {
    loadResources() {
      security.accessResources().then(res => {
        this.resources = res.data
      })
    }
  }
}
</script>


